﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Lab2.Phill
{
    class Program
    {
        static void main(string[] args)
        {
             string s = Console.ReadLine();
             dev(s);
             Console.ReadKey();
        
        }
        static void dev(string s)
        {
            if (Convert.ToInt32(s) > 1000)
                Console.WriteLine("You should write some number less then 1000");
            else
            {           
            string HundredStr = s.Substring(0, 1);
            int HundredInt = Convert.ToInt32(HundredStr);
            string TenStr = s.Substring(1, 2);
            int TenInt = Convert.ToInt32(TenStr );

                if (Convert.ToInt32(s) > 100)
                {  
                     if (TenInt  < 20)
                         Console.WriteLine (Processing.Hundred(HundredInt ) + "" +Processing.Numbers1to19(TenInt ));
                     else 
                         Console.WriteLine (Processing.Hundred(HundredInt) + "" +Processing.Numbers21to99(TenInt));

                }
                else 
                {
                     if (TenInt  < 20)
                          Console.WriteLine (Processing.Numbers1to19(TenInt ));
                     else   
                          Console.WriteLine (Processing.Numbers21to99(TenInt ));
                }
            }
        }

    }        
    
     class Processing
    {
       public static string Hundred(int i)
        {
            string processing = "";

            switch(i)
            {
                case 0: processing = (""); break;
                case 1: processing = ("сто");break;
                case 2: processing = ("двести");break;
                case 3: processing = ("триста");break;
                case 4: processing = ("четыреста");break;
                case 5: processing = ("пятьсот");break;
                case 6: processing = ("шестьсот");break;
                case 7: processing = ("семьсот");break;
                case 8: processing = ("восемьсот");break;
                case 9: processing = ("девятьсот");break;

            }
            return processing;
        }     
       public static string Numbers1to19(int i)
        {
            string processing = "";

            switch(i)
            {
                case 1:processing = (" один ");break;
                case 2:processing = (" два ");break;
                case 3:processing = (" три ");break;
                case 4:processing = (" четыре ");break;
                case 5:processing = (" пять ");break;
                case 6:processing = (" шесть ");break;
                case 7:processing = (" семь ");break;
                case 8:processing = (" восемь ");break;
                case 9:processing = (" девять ");break;
                case 10:processing = (" десять ");break;
                case 11:processing = (" одиннадцать ");break;
                case 12:processing = (" двенадцать ");break;
                case 13:processing = (" тринадцать ");break;
                case 14:processing = (" четырнадцать ");break;
                case 15:processing = (" пятнадцать ");break;
                case 16:processing = (" шестнадцать ");break;
                case 17:processing = (" семнадцать ");break;
                case 18:processing = (" восемнадцать ");break;
                case 19:processing = (" девятнадцать ");break;
            }
            return processing;
        }
       public  static string Numbers21to99(int i)
        {
            int j = i / 10;
            int k = i % 10;
            string processing = "";
            switch (j)
            {
                case 2:processing = (" двадцать " + Numbers0to9(k));break;
                case 3:processing = (" тридцать " + Numbers0to9(k));break;
                case 4:processing = (" сорок " + Numbers0to9(k));break;
                case 5:processing = (" пятдесят " + Numbers0to9(k));break;
                case 6:processing = (" шестдесят " + Numbers0to9(k));break;
                case 7:processing = (" семдесят " + Numbers0to9(k));break;
                case 8:processing = (" восемдесят " + Numbers0to9(k));break;
                case 9:processing = (" девяносто " + Numbers0to9(k));break;
            }
            return processing;
        }
       public  static string Numbers0to9(int i)
        {
            string processing = "";
            switch (i)
            {
                case 1:processing = (" один ");break;
                case 2:processing = (" два ");break;
                case 3:processing = (" три ");break;
                case 4:processing = (" четыре ");break;
                case 5:processing = (" пять ");break;
                case 6:processing = (" шесть ");break;
                case 7:processing = (" семь ");break;
                case 8:processing = (" восемь ");break;
                case 9:processing = (" девять ");break;
            }
            return processing;
        }

    }
    
}
 

